package com.hzit.hzb.core.controller.admin;


import com.hzit.common.result.R;
import com.hzit.hzb.core.pojo.entity.LendReturn;
import com.hzit.hzb.core.service.LendReturnService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 还款记录表 前端控制器
 * </p>
 *
 * @author hbxfwf
 * @since 2024-08-27
 */
@RestController
@RequestMapping("/admin/core/lendReturn")
public class AdminLendReturnController {
	@Autowired
	private LendReturnService lendReturnService;

	/**
	 * 根据标的id查询还款记录列表
	 * @param id
	 * @return
	 */
	@GetMapping("/fetchLendReturnList/{id}")
	public R fetchLendReturnList(@PathVariable("id") Long id){
		List<LendReturn> lendReturnList = lendReturnService.fetchLendReturnList(id);
		return R.ok().data("list",lendReturnList);
	}

}

